﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace QD.DataBase.DBHelper
{
    public delegate void TransationHandle(DbTransationEvent e);
    public class DbTransationEvent
    {
        public DbTransationEvent(IDbTransaction trans) { this._trans = trans; }
        public bool Cancel
        {
            get { return _cancel; }
            set { _cancel = value; if (_cancel)_trans.Rollback(); }
        }
        private bool _cancel = false;
        private IDbTransaction _trans = null;
        public IDbTransaction Transaction { get { return _trans; } }
    }
}
